
stamp-webkittestrunner-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_WebKitTestRunner_SOURCES) $(Libraries_libTestRunnerInjectedBundle_la_SOURCES)
	$(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk \
	&& echo timestamp > $(@F)

BUILT_SOURCES += $(top_builddir)/stamp-webkittestrunner-forwarding-headers

if ENABLE_WEBKIT2
noinst_PROGRAMS += \
	Programs/WebKitTestRunner
endif

Programs_WebKitTestRunner_SOURCES = \
	Tools/WebKitTestRunner/EventSenderProxy.h \
	Tools/WebKitTestRunner/gtk/main.cpp \
	Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp \
	Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp \
	Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp \
	Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp \
	Tools/WebKitTestRunner/CyclicRedundancyCheck.cpp \
	Tools/WebKitTestRunner/CyclicRedundancyCheck.h \
	Tools/WebKitTestRunner/GeolocationProviderMock.cpp \
	Tools/WebKitTestRunner/GeolocationProviderMock.h \
	Tools/WebKitTestRunner/PixelDumpSupport.cpp \
	Tools/WebKitTestRunner/PixelDumpSupport.h \
	Tools/WebKitTestRunner/PlatformWebView.h \
	Tools/WebKitTestRunner/StringFunctions.h \
	Tools/WebKitTestRunner/TestController.cpp \
	Tools/WebKitTestRunner/TestController.h \
	Tools/WebKitTestRunner/TestInvocation.cpp \
	Tools/WebKitTestRunner/TestInvocation.h \
	Tools/WebKitTestRunner/WebNotificationProvider.cpp \
	Tools/WebKitTestRunner/WebNotificationProvider.h \
	Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
	Tools/WebKitTestRunner/WorkQueueManager.cpp \
	Tools/WebKitTestRunner/WorkQueueManager.h

Programs_WebKitTestRunner_CPPFLAGS = \
	-include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
	-I$(srcdir)/Tools/WebKitTestRunner \
	-I$(srcdir)/Source/WebCore/platform/gtk \
	-I$(top_builddir)/DerivedSources/WebKit2/include \
	$(global_cppflags) \
	$(javascriptcore_cppflags) \
	$(webcore_cppflags) \
	$(GLOBALDEPS_CFLAGS) \
	$(CAIRO_CFLAGS) \
	$(GTK_CFLAGS) \
	$(LIBSOUP_CFLAGS)
Programs_WebKitTestRunner_CXXFLAGS = $(global_cxxflags)
Programs_WebKitTestRunner_CFLAGS = $(global_cflags)

Programs_WebKitTestRunner_LDADD = \
	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
	libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
	$(GLOBALDEPS_LIBS) \
	$(CAIRO_LIBS) \
	$(GTK_LIBS) \
	$(GLIB_LIBS) \
	$(LIBSOUP_LIBS) \
	$(FREETYPE_LIBS) \
	$(WINMM_LIBS) \
	$(XRENDER_LIBS) \
	$(XT_LIBS)

Programs_WebKitTestRunner_LDFLAGS = \
	-no-fast-install \
	-no-install

# The InjectedBundle library allows the render process to load harness code.
if ENABLE_WEBKIT2
noinst_LTLIBRARIES += Libraries/libTestRunnerInjectedBundle.la
endif

webkittestrunner_built_sources += \
	DerivedSources/InjectedBundle/JSAccessibilityController.cpp \
	DerivedSources/InjectedBundle/JSAccessibilityTextMarker.cpp \
	DerivedSources/InjectedBundle/JSAccessibilityTextMarkerRange.cpp \
	DerivedSources/InjectedBundle/JSAccessibilityUIElement.cpp \
	DerivedSources/InjectedBundle/JSEventSendingController.cpp \
	DerivedSources/InjectedBundle/JSGCController.cpp \
	DerivedSources/InjectedBundle/JSTestRunner.cpp \
	DerivedSources/InjectedBundle/JSTextInputController.cpp
nodist_Libraries_libTestRunnerInjectedBundle_la_SOURCES = $(webkittestrunner_built_sources)
BUILT_SOURCES += $(webkittestrunner_built_sources)

Libraries_libTestRunnerInjectedBundle_la_SOURCES = \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp \
	Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h \
	Tools/WebKitTestRunner/InjectedBundle/ActivateFonts.h \
	Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp \
	Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp \
	Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h \
	Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp \
	Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h \
	Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp \
	Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h \
	Tools/WebKitTestRunner/InjectedBundle/GCController.cpp \
	Tools/WebKitTestRunner/InjectedBundle/GCController.h \
	Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp \
	Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp \
	Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp \
	Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h \
	Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp \
	Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp \
	Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h \
	Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp \
	Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp \
	Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h \
	Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp \
	Tools/WebKitTestRunner/InjectedBundle/TestRunner.h \
	Tools/WebKitTestRunner/InjectedBundle/TextInputController.cpp \
	Tools/WebKitTestRunner/InjectedBundle/TextInputController.h

Libraries_libTestRunnerInjectedBundle_la_LIBADD = \
	libWebCoreInternals.la

Libraries_libTestRunnerInjectedBundle_la_LDFLAGS = \
	-rpath ${shell pwd}/$(top_builddir)/../unix/TestNetscapePlugin/.libs \
	$(no_undefined) \
	-avoid-version \
	-module

Libraries_libTestRunnerInjectedBundle_la_CPPFLAGS = \
	-DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\" \
	-DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
	-include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
	-I$(srcdir)/Tools/WebKitTestRunner \
	-I$(srcdir)/Tools/WebKitTestRunner/InjectedBundle \
	-I$(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \
	-I$(srcdir)/Source/WebCore/testing/js \
	-I$(top_builddir)/DerivedSources/InjectedBundle \
	-I$(top_builddir)/DerivedSources/WebKit2/include \
	$(global_cppflags) \
	$(javascriptcore_cppflags) \
	$(webcore_cppflags) \
	$(GLOBALDEPS_CFLAGS) \
	$(CAIRO_CFLAGS) \
	$(GLIB_CFLAGS) \
	$(GTK_CFLAGS) \
	$(LIBSOUP_CFLAGS)
Libraries_libTestRunnerInjectedBundle_la_CXXFLAGS = $(global_cxxflags)
Libraries_libTestRunnerInjectedBundle_la_CFLAGS = $(global_cflags)

code_generation_dependencies = \
	Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
	Source/WebCore/bindings/scripts/CodeGenerator.pm \
	Source/WebCore/bindings/scripts/IDLParser.pm \
	Source/WebCore/bindings/scripts/InFilesParser.pm \
	Source/WebCore/bindings/scripts/generate-bindings.pl

DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTestRunner/InjectedBundle/Bindings/%.idl $(code_generation_dependencies)
	$(AM_V_GEN)$(PERL) \
		-I $(srcdir)/Source/WebCore/bindings/scripts \
		-I $(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \
		$(srcdir)/Source/WebCore/bindings/scripts/generate-bindings.pl \
		--defines \"\" --generator TestRunner \
		--include $(srcdir)/Tools/InjectedBundle/Bindings \
		--outputDir $(top_builddir)/DerivedSources/InjectedBundle \
		$<

EXTRA_DIST += \
	$(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
	$(srcdir)/Source/WebCore/bindings/scripts/CodeGenerator.pm \
	$(srcdir)/Source/WebCore/bindings/scripts/IDLParser.pm \
	$(srcdir)/Source/WebCore/bindings/scripts/InFilesParser.pm \
	$(srcdir)/Source/WebCore/bindings/scripts/generate-bindings.pl \
	$(shell ls $(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings/*.idl)
